<?php
/**
 * 购物车
 * User:LLW
 * Date:2020-03-30
 */

namespace app\api\controller;

use app\api\model\OrderCartModel;
use think\Request;

class Ordercart extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct();
        $this->cart = new OrderCartModel();
    }

    /**
     * 首页
     * @return object
     */
    public function CartList()
    {
        $list = $this->cart->getList();
        return $list;
    }

    /**
     * 改变状态
     * @return object
     */
    public function CartState()
    {
        $res = $this->cart->getState();
        return $res;
    }
}